#pragma once
#include<iostream>
#include<stdbool.h>

namespace hu
{
	template<class iterator,class Ref,class ptr>
	struct Reiterator
	{
		typedef Reiterator<iterator, Ref, ptr> Self;
		iterator _it;
		Reiterator(iterator it)
			:_it(it)
		{}

		Ref operator*()
		{
			iterator tmp = _it;
			return *(--tmp);
		}

		ptr operator->()
		{
			return &(operator*());
		}

		void operator++()
		{
			--_it;
		}
		void operator--()
		{
			_it++;
		}
		bool operator!=(Self& s) const
		{
			return (_it != s._it);
		}
	};
}